package com.itfreer.gis.map.resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itfreer.form.api.BaseRestService;
import com.itfreer.form.api.BaseService;
import com.itfreer.gis.map.resource.entity.CustomDataEntity;

import io.swagger.annotations.Api;

/**
 * 定义我的数据Rest服务接口
 */
@RestController
@RequestMapping("/giscustomdata")
@Api("我的数据")
public class RestCustomDataService extends BaseRestService<CustomDataEntity> {

	@Autowired(required = false)
	private CustomDataService service;

	@Reference(lazy = true, check = false)
	private CustomDataService dubboService;

	@Override
	protected BaseService<CustomDataEntity> getService() {
		if (service == null) {
			return dubboService;
		} else {
			return service;
		}
	}
}
